﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace ReactiveGameDemo
{
    class Enemy : GameObject
    { 
        public Enemy(Game game) : base(game, "enemy") { }

        public override void Initialize()
        {
            base.Initialize();
            scale = (float)(randGen.NextDouble() / 2 + 0.5);
            rotation = (float)(randGen.NextDouble() * MathHelper.TwoPi);
        }

        public override void Update(GameTime gameTime)
        {
            position += Forward;
            int width = GraphicsDevice.Viewport.Width;
            int height = GraphicsDevice.Viewport.Height;
            position.X = (position.X + width) % width;
            position.Y = (position.Y + height) % height;
            base.Update(gameTime);
        }
    }
}
